package com.dpwx.framework.mvc;

import org.puremvc.java.multicore.interfaces.INotification;
import org.puremvc.java.multicore.patterns.mediator.Mediator;

public abstract class BaseMediator extends Mediator {
	
	private BaseActivity mActivity;
	public BaseMediator(BaseActivity activity, String name) {
		super(name, null);
		this.mActivity = activity;
		setViewComponent(onCreateView());
	}
	
	public abstract BaseView onCreateView();
	
	@Override
	public abstract String[] listNotificationInterests();
	
	@Override
	public abstract void handleNotification(INotification notification);
	
	@Override
	public BaseView getViewComponent() {
		// TODO Auto-generated method stub
		return (BaseView) super.getViewComponent();
	};
	
	public BaseActivity getActivity() {
		return this.mActivity;
	}

}
